<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

</head>

<body>
    <script>
        // es6 新增声明字符串的方式[``] '' ""
        // 1.声明
        // let str = `我也是一个字符串`;
        // console.log(str, typeof str);

        // 2.内容中可以直接出现换行符
        let str = `<ul>
                    <li>沈腾</li>
                    <li>玛丽</li>
                    <li>魏翔</li>
                    </ul>`;

        // 3.变量拼接
        let lovest = '魏翔';
        let out = `将${lovest}替换成lovest`;
        console.log(out);
        // es5是用+号来拼接,es6可以用${变量名}
    </script>
</body>

</html>